﻿using ShanNiang.Hosting.Common;
using ShanNiang.Hosting.Enumerate;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ShanNiang.Service.PackingModels.Requests
{
    /// <summary>
    /// 保存箱码请求
    /// </summary>
    public class PackUpBoxRequest : RequestBase
    {
        public PackUpBoxRequest(string code, Guid itemId, IEnumerable<string?>? bottleCodes, Guid? enterpriseId)
        {
            Code = code;
            ItemId = itemId;
            if (bottleCodes != null)
            {
                BottleCodes = new List<string?>(bottleCodes);
            }
            else
            {
                bottleCodes=new List<string?>();
            }

            EnterpriseId = enterpriseId;
        }
        /// <summary>
        /// 商品Id
        /// </summary>
        public Guid ItemId { get; set; }
        /// <summary>
        /// 专项记录
        /// </summary>
        public Guid? PackingRecordId { get; set; }
        /// <summary>
        /// 装箱瓶
        /// </summary>
        public List<string?>? BottleCodes { get; set; }
        /// <summary>
        /// 这也是箱码
        /// </summary>
        public string? Code { get; set; }
        /// <summary>
        /// 企业id
        /// </summary>
        public Guid? EnterpriseId { get; set; }

        public override ApiServer ApiServer => ApiServer.XkmServer;

        public override HttpMethod Method => HttpMethod.Put;

        public override bool NeedToken => true;

        protected override string RequestPath => "/api/Packing/PackUpBox";
    }
}
